package com.ls.blog.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author lishun
 * @since 2022-01-14
 */
@Data
public class CommentDTO implements Serializable {

    private Integer id;

    private String content;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "Asia/ShangHai")
    private LocalDateTime createTime;

    private String ip;

    private Integer articleId;

    private Integer parentCommentId;

    private Integer userId;

    private Integer replyId;

    /**
     * 用户头像
     */
    private String avatar;

    /**
     * 文章标题
     */
    private String title;

    /**
     * 用户名
     */
    private String nickname;

    /**
     * 配合前端打开回复框
     */
    private Boolean flag = false;

    /**
     * 是否能回复
     */
    private Boolean enableRel = false;

    /**
     * 子评论
     */
    private List<CommentDTO> replyList;

    private String parContent;

    /**
     * 被评论的昵称
     */
    private String replyNickname;

    /**
     * 儿子总数
     */
    private Integer total;

    private int likeCount;

}
